//go:build wireinject
// +build wireinject

/*
 * @Author: gonglf
 * @Date: 2022-09-27 16:07:52
 * @LastEditors: gonglf
 * @LastEditTime: 2022-09-27 16:10:01
 * @Description:
 *
 */
package app

import (
	"gitee.com/mywire/demo/common"
	"gitee.com/mywire/demo/dal"
	"gitee.com/mywire/demo/handler"
	"gitee.com/mywire/demo/service"
	"github.com/google/wire"
)

func BuildInjector() (*Injector, error) {
	wire.Build(
		NewInjector,

		// handler
		handler.NewProjectHandler,

		// services
		service.NewProjectService,
		// 更多service...

		//dal
		dal.NewProjectDal,
		dal.NewQuestionDal,
		dal.NewQuestionModelDal,
		// 更多dal...

		// db
		common.InitGormDB,
		// other components...
	)

	return new(Injector), nil
}
